package com.ruoyi.comment.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 评论管理对象 comment
 * 
 * @author gu
 * @date 2025-05-18
 */
@Data
public class Comment extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 所属帖子id */
    private Long postId;

    /** 评论时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "评论时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date time;

    /** 评论内容(限制字数，或者MongDB) */
    @Excel(name = "评论内容(限制字数，或者MongDB)")
    private String content;

    /** 评论用户id */
    private Long userId;

    /** 评论点赞数 */
    @Excel(name = "评论点赞数")
    private Long supportCount;

    /** 评论获赞数 */
    private Long lookCount;

    /** 是否被删除 */
    private Long isDeleted;

    private  com.ruoyi.user.domain.User user;

    private com.ruoyi.post.domain.Post post;



    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("postId", getPostId())
            .append("time", getTime())
            .append("content", getContent())
            .append("userId", getUserId())
            .append("supportCount", getSupportCount())
            .append("lookCount", getLookCount())
            .append("isDeleted", getIsDeleted())
            .toString();
    }
}
